package com.fanshuai.starter;

import com.fanshuai.service.FanshuaiService;
import com.fanshuai.service.HelloService;
import com.fanshuai.starter.config.StarterConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.context.ApplicationContext;

/**
 * 本项目的application.yml配置文件，会覆盖依赖jar包的配置文件
 */
public class StarterMain {
    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(StarterConfig.class, args);

        FanshuaiService fanshuaiService = context.getBean(FanshuaiService.class);
        fanshuaiService.show();

        HelloService helloService = context.getBean(HelloService.class);
        helloService.hello();
    }
}
